Throughout all the data analysis we’ve done, the datasets have become more fragmented - lexical recall, gist, and eye tracking datasets. I want to put them all together in one whole dataset again so we can perform some analyses more efficiently (particularly correlations). The only thing I need to remember is we’ll have a new column called eye_exclude and if it is set to TRUE it means we can’t include that row in any analysis relating to eye gaze (usually because that trial was less than 25% looking).
# Libraries
library(tidyverse)
library(lme4)
library(lmerTest)
library(scales)
library(viridis)
library(agricolae)
library(GGally)
library(ez)
# Load lex and eye data
cleanlexdata <- read_csv("cleandata.csv") %>%
select(-(forehead:total))
cleaneyedata <- read_csv("cleanpercentdata.csv") %>%
spread(aoi,percent) %>%
add_column(eye_exclude = FALSE)
# What rows were removed from the eye data back in 03eyegaze? Let's add back in
# With a new column - eye_exclude
removed <- anti_join(cleanlexdata, cleaneyedata) %>%
add_column(eye_exclude = TRUE)
eyelexdata <- bind_rows(cleaneyedata, removed)
# Load gist data
gist <- read_csv('gist_indiv.csv', col_types = cols(
participant = col_character(),
gist.fw1 = col_integer(),
gist.rv2 = col_integer(),
gist.fw3 = col_integer(),
gist.rv4 = col_integer()
)) %>%
gather(video, gist, gist.fw1:gist.rv4) %>%
mutate(video = str_sub(video,6,8))
# Presto, our full reunified dataset - 'fulldata'
# But I want to remove columns I don't want anymore and will recalculate later
fulldata <- left_join(eyelexdata, gist) %>%
select(-moutheye, -facechest, -face, -chest)We have some changes to make to the groups. First, fix Josh as learning ASL when he was 6. Next, drop the DeafNative Group and reclassify all who learned ASL < 3.9 as DeafEarly and ASL => 4.0 as DeafLate.
# Change Josh's AoASL to 6
fulldata <- fulldata %>%
mutate(aoasl = as.double(aoasl)) %>%
mutate(aoasl = case_when(
participant == "Josh" ~ 6,
TRUE ~ aoasl
))
# Reclassify Groups
fulldata <- fulldata %>%
mutate(maingroup = case_when(
hearing == "Deaf" & aoasl < 4 ~ "DeafEarly",
hearing == "Deaf" & aoasl >= 4 ~ "DeafLate",
maingroup == "HearingLateASL" ~ "HearingLate",
maingroup == "HearingNoviceASL" ~ "HearingNovice"
))
# Create Participant Demographics Table
participant_info <- fulldata %>%
select(-(acc:gist)) %>%
select(-(video:direction)) %>%
distinct() %>%
group_by(maingroup) %>%
summarise(n = n(),
age_mean = mean(age),
age_sd = sd(age),
aoasl_mean = mean(aoasl),
aoasl_sd = sd(aoasl),
signyrs_mean = mean(signyrs),
signyrs_sd = sd(signyrs),
selfrate_mean = mean(selfrate),
selfrate_sd = sd(selfrate)) %>%
ungroup() %>%
mutate_if(is.double, funs(round(., 2))) %>%
mutate(age = paste(age_mean, "±", age_sd, sep = " "),
aoasl = paste(aoasl_mean, "±", aoasl_sd, sep = " "),
signyrs = paste(signyrs_mean, "±", signyrs_sd, sep = " "),
selfrate = paste(selfrate_mean, "±", selfrate_sd, sep = " ")) %>%
select(-(age_mean:selfrate_sd))
participant_infowrite_csv(fulldata, "finaldataset.csv")
data_lowaoi <- fulldata %>% select(participant, story, belly:upperchest) %>% select(-eyes, -mouth, -chin) %>% gather(aoi, percent, belly:upperchest)
data_lowaoi$percent[is.na(data_lowaoi$percent)] <- 0
mean(data_lowaoi$percent, na.rm=TRUE)[1] 0.007421356
sd(data_lowaoi$percent, na.rm=TRUE)[1] 0.02793204
Below are the ANOVA outputs for participant demographics, and LSDs for each.
Participants’ age
Df Sum Sq Mean Sq F value Pr(>F)
maingroup 3 1810 603.3 14.29 8.75e-07 ***
Residuals 48 2026 42.2
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Participants’ AoASL
Df Sum Sq Mean Sq F value Pr(>F)
maingroup 3 2553.9 851.3 89.98 <2e-16 ***
Residuals 48 454.1 9.5
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Participants’ Sign Yrs
Df Sum Sq Mean Sq F value Pr(>F)
maingroup 3 7032 2344.1 59.37 3.52e-16 ***
Residuals 48 1895 39.5
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Participants’ Self-Rating
Df Sum Sq Mean Sq F value Pr(>F)
maingroup 3 30.71 10.237 72.37 <2e-16 ***
Residuals 48 6.79 0.141
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Let’s generate a table for lexical recall and gist for forward vs. reversed stories.
lexgist_info <- fulldata %>%
group_by(maingroup, direction) %>%
summarise(lex_mean = mean(acc, na.rm = TRUE),
lex_sd = sd(acc, na.rm = TRUE),
gist_mean = mean(gist),
gist_sd = sd(gist)) %>%
ungroup() %>%
mutate_if(is.double, funs(round(., 2))) %>%
mutate(lex = paste(lex_mean, "±", lex_sd, sep = " "),
gist = paste(gist_mean, "±", gist_sd, sep = " ")) %>%
select(-(lex_mean:gist_sd)) %>%
gather(metric, value, lex:gist) %>%
unite("metric", c(metric, direction), sep = "_") %>%
spread(metric, value) %>%
print()And then bar charts too after that with error bars.
# Gist bar chart
gist_bar <- fulldata %>% select(participant, maingroup, direction, gist) %>%
group_by(maingroup, participant, direction) %>%
summarise(gist = mean(gist)) %>%
group_by(maingroup, direction) %>%
summarise(mean = mean(gist),
sd = sd(gist),
count = n(),
se = sd/sqrt(count)) %>%
ungroup() %>%
mutate(maingroup = case_when(
maingroup == "DeafEarly" ~ "Deaf Early",
maingroup == "DeafLate" ~ "Deaf Late",
maingroup == "HearingLate" ~ "Hearing Late",
maingroup == "HearingNovice" ~ "Hearing Novice"
))
ggplot(gist_bar, aes(x = maingroup, y = mean, fill = direction)) +
geom_bar(stat = "identity", position = position_dodge()) +
geom_errorbar(aes(ymin = mean-se, ymax = mean+se), position = position_dodge(0.9), width = 0.5) +
labs(title = "Gist", x = "", y = "mean gist accuracy") +
scale_y_continuous(labels = percent, limits = c(0,1)) + theme_bw()# Lex bar chart
lex_bar <- fulldata %>% select(participant, maingroup, direction, acc) %>%
group_by(maingroup, participant, direction) %>%
summarise(acc = mean(acc, na.rm = TRUE)) %>%
group_by(maingroup, direction) %>%
summarise(mean = mean(acc, na.rm = TRUE),
sd = sd(acc, na.rm = TRUE),
count = n(),
se = sd/sqrt(count)) %>%
ungroup() %>%
mutate(maingroup = case_when(
maingroup == "DeafEarly" ~ "Deaf Early",
maingroup == "DeafLate" ~ "Deaf Late",
maingroup == "HearingLate" ~ "Hearing Late",
maingroup == "HearingNovice" ~ "Hearing Novice"
))
ggplot(lex_bar, aes(x = maingroup, y = mean, fill = direction)) +
geom_bar(stat = "identity", position = position_dodge()) +
geom_errorbar(aes(ymin = mean-se, ymax = mean+se), position = position_dodge(0.9), width = 0.5) +
labs(title = "Lexical Recall", x = "", y = "mean lexical recall accuracy") +
scale_y_continuous(labels = percent, limits = c(0,1)) +
geom_hline(yintercept = .5, linetype = "dotted") +
coord_cartesian(ylim = c(.5,1)) + theme_bw()And let’s calculate the average reduction in score due to reversal first is lex recall, then gist.
reversal_lex <- fulldata %>%
group_by(id, direction) %>%
summarise(lex_mean = mean(acc, na.rm = TRUE)) %>%
spread(direction, lex_mean) %>%
group_by(id) %>%
mutate(reversal = forward - reversed) %>%
ungroup()
paste("lex mean", mean(reversal_lex$reversal))[1] "lex mean 0.141570192307692"
paste("lex sd", sd(reversal_lex$reversal))[1] "lex sd 0.102655144785552"
reversal_gist <- fulldata %>%
group_by(id, direction) %>%
summarise(gist_mean = mean(gist, na.rm = TRUE)) %>%
spread(direction, gist_mean) %>%
group_by(id) %>%
mutate(reversal = forward - reversed) %>%
ungroup()
paste("gist mean", mean(reversal_gist$reversal))[1] "gist mean 0.451923076923077"
paste("gist sd", sd(reversal_gist$reversal))[1] "gist sd 0.39925930667527"
Next, we’re going to do ANOVAs. We’ll always do it in this order.
(I also ran ANCOVAs before but now have taken them out…they are below: (4) ANCOVA with factor Direction, and covariate AoASL and Age, (5) Regression with variables AoASL and Age, for Forward only, (6) Regression with variables AoASL and Age, for Reverse only.)
I did not include Age as a covariate in the first 3 ANOVAs because they did not add to or change the model in any significant way.
# First let's make the participant-level dataset with which we'll do our ANCOVAs.
participant_data <- fulldata %>%
group_by(maingroup, participant, direction) %>%
mutate(gist = mean(gist, na.rm = TRUE),
acc = mean(acc, na.rm = TRUE)) %>%
ungroup() %>%
select(id, participant, hearing, maingroup, direction, age, aoasl, acc, gist) %>%
distinct() %>%
mutate(id = factor(id),
participant = factor(participant),
hearing = factor(hearing),
maingroup = factor(maingroup),
direction = factor(direction))
# # Gist ANOVA 1
# gist_aov1 <- aov(gist ~ maingroup * direction, data = participant_data)
# summary(gist_aov1)
# gist_lsd1 <- LSD.test(gist_aov1, "maingroup", group = FALSE)
# gist_lsd1$comparison
# Gist EZ ANOVA
ezANOVA(
data = participant_data,
dv = gist,
wid = id,
within = direction,
between = maingroup,
type = 3
)["ANOVA"]Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
# # Gist ANOVA 2
# gist_aov2 <- aov(gist ~ maingroup, data = filter(participant_data, direction == "forward"))
# summary(gist_aov2)
# gist_lsd2 <- LSD.test(gist_aov2, "maingroup", group = FALSE)
# gist_lsd2$comparison
ezANOVA(
data = filter(participant_data, direction == "forward"),
dv = gist,
wid = id,
between = maingroup,
type = 3
)["ANOVA"]Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
# # KW Non-parametric test (like one-way ANOVA)
# kruskal.test(gist ~ maingroup, data = as.matrix(filter(participant_data, direction == "forward")))
#
# # Chi Sq
# gist_chisq_fw <- participant_data %>%
# ungroup() %>%
# filter(direction == "forward") %>%
# select(maingroup, gist) %>%
# group_by(maingroup, gist) %>%
# summarise(count = n()) %>%
# spread(gist, count) %>%
# rename(none = "0",
# one = "0.5",
# both = "1")
#
# gist_chisq_fw[is.na(gist_chisq_fw)] <- 0L
# gist_chisq_fw <- cbind(gist_chisq_fw[,"none"], gist_chisq_fw[,"one"], gist_chisq_fw[,"both"])
# chisq.test(gist_chisq_fw)# # Gist ANOVA 3
# gist_aov3 <- aov(gist ~ maingroup, data = filter(participant_data, direction == "reversed"))
# summary(gist_aov3)
# gist_lsd3 <- LSD.test(gist_aov3, "maingroup", group = FALSE)
# gist_lsd3$comparison
ezANOVA(
data = filter(participant_data, direction == "reversed"),
dv = gist,
wid = id,
between = maingroup,
type = 3
)["ANOVA"]Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
# # KW Non-parametric test (like one-way ANOVA)
# kruskal.test(gist ~ maingroup, data = as.matrix(filter(participant_data, direction == "reversed")))
#
# # Chi Sq
# gist_chisq_rv <- participant_data %>%
# ungroup() %>%
# filter(direction == "reversed") %>%
# select(maingroup, gist) %>%
# group_by(maingroup, gist) %>%
# summarise(count = n()) %>%
# spread(gist, count) %>%
# rename(none = "0",
# one = "0.5",
# both = "1")
#
# gist_chisq_rv[is.na(gist_chisq_rv)] <- 0L
# gist_chisq_rv <- cbind(gist_chisq_rv[,"none"], gist_chisq_rv[,"one"], gist_chisq_rv[,"both"])
# chisq.test(gist_chisq_rv)# # Lexical Recall ANOVA 1
# acc_aov1 <- aov(acc ~ maingroup * direction, data = participant_data)
# summary(acc_aov1)
# acc_lsd1 <- LSD.test(acc_aov1, "maingroup", group = FALSE)
# acc_lsd1$comparison
ezANOVA(
data = participant_data,
dv = acc,
wid = id,
within = direction,
between = maingroup,
type = 3
)["ANOVA"]Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
# # Lexical Recall ANOVA 2
# acc_aov2 <- aov(acc ~ maingroup, data = filter(participant_data, direction == "forward"))
# summary(acc_aov2)
# acc_lsd2 <- LSD.test(acc_aov2, "maingroup", group = FALSE)
# acc_lsd2$comparison
ezANOVA(
data = filter(participant_data, direction == "forward"),
dv = acc,
wid = id,
between = maingroup,
type = 3
)["ANOVA"]Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
# # Lexical Recall ANOVA 3
# acc_aov3 <- aov(acc ~ maingroup, data = filter(participant_data, direction == "reversed"))
# summary(acc_aov3)
# acc_lsd3 <- LSD.test(acc_aov3, "maingroup", group = FALSE)
# acc_lsd3$comparison
ezANOVA(
data = filter(participant_data, direction == "reversed"),
dv = acc,
wid = id,
between = maingroup,
type = 3
)["ANOVA"]Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Next, we want to look at correlations between AoA and Gist, and betwen AoA and Lexical Recall. Rain asked for forward and reversed separately (1) deaf only, (2) hearing only, and (3) both. Let’s make it work.
# Let's make participant-level data, and have forward/reversed in separate columns
lexgist_data <- fulldata %>%
group_by(maingroup, participant, direction) %>%
mutate(gist = mean(gist, na.rm = TRUE),
lex = mean(acc, na.rm = TRUE)) %>%
ungroup() %>%
select(maingroup, participant, hearing, direction, aoasl, signyrs, age, gist, lex) %>%
distinct() %>%
gather(metric, value, gist:lex) %>%
unite(metricvalue, c(metric, direction), sep = "_") %>%
spread(metricvalue, value) %>%
select(-participant, -maingroup)
lexgist_deaf <- lexgist_data %>% filter(hearing == "Deaf") %>% select(-hearing)
lexgist_hearing <- lexgist_data %>% filter(hearing == "Hearing") %>% select(-hearing)
lexgist_all <- lexgist_data %>% select(-hearing)
# Load awesome function to make correlation tables with stars for significance
# From: https://myowelt.blogspot.co.uk/2008/04/beautiful-correlation-tables-in-r.html
corstarsl <- function(x){
require(Hmisc)
x <- as.matrix(x)
R <- Hmisc::rcorr(x)$r
p <- Hmisc::rcorr(x)$P
## define notions for significance levels; spacing is important.
mystars <- ifelse(p < .001, "***", ifelse(p < .01, "** ", ifelse(p < .05, "* ", " ")))
## trunctuate the matrix that holds the correlations to two decimal
R <- format(round(cbind(rep(-1.11, ncol(x)), R), 2))[,-1]
## build a new matrix that includes the correlations with their apropriate stars
Rnew <- matrix(paste(R, mystars, sep=""), ncol=ncol(x))
diag(Rnew) <- paste(diag(R), " ", sep="")
rownames(Rnew) <- colnames(x)
colnames(Rnew) <- paste(colnames(x), "", sep="")
## remove upper triangle
Rnew <- as.matrix(Rnew)
Rnew[upper.tri(Rnew, diag = TRUE)] <- ""
Rnew <- as.data.frame(Rnew)
## remove last column and return the matrix (which is now a data frame)
Rnew <- cbind(Rnew[1:length(Rnew)-1])
return(Rnew)
}
# Correlations for Deaf
print("DEAF Correlations - Pearson's r")[1] "DEAF Correlations - Pearson's r"
#corstarsl(lexgist_deaf)
Hmisc::rcorr(as.matrix(lexgist_deaf))$r aoasl signyrs age gist_forward gist_reversed lex_forward lex_reversed
aoasl 1.00000000 -0.50188273 0.2569266 0.08266371 -0.25585943 0.14743346 -0.25601873
signyrs -0.50188273 1.00000000 0.7005996 0.18321127 -0.01264108 0.27968505 0.06666998
age 0.25692660 0.70059955 1.0000000 0.27454460 -0.17264941 0.42997837 -0.12765634
gist_forward 0.08266371 0.18321127 0.2745446 1.00000000 0.01762269 -0.08155560 -0.09770666
gist_reversed -0.25585943 -0.01264108 -0.1726494 0.01762269 1.00000000 0.02667231 0.36021802
lex_forward 0.14743346 0.27968505 0.4299784 -0.08155560 0.02667231 1.00000000 0.35984892
lex_reversed -0.25601873 0.06666998 -0.1276563 -0.09770666 0.36021802 0.35984892 1.00000000
print("DEAF Correlations - P-values")[1] "DEAF Correlations - P-values"
Hmisc::rcorr(as.matrix(lexgist_deaf))$P aoasl signyrs age gist_forward gist_reversed lex_forward lex_reversed
aoasl NA 5.536857e-03 1.784812e-01 0.6698839 0.18035489 0.44533530 0.18007434
signyrs 0.005536857 NA 2.316796e-05 0.3414473 0.94810844 0.14172236 0.73113301
age 0.178481213 2.316796e-05 NA 0.1495001 0.37046625 0.01990877 0.50930544
gist_forward 0.669883883 3.414473e-01 1.495001e-01 NA 0.92770438 0.67406661 0.61409897
gist_reversed 0.180354888 9.481084e-01 3.704662e-01 0.9277044 NA 0.89076140 0.05492031
lex_forward 0.445335297 1.417224e-01 1.990877e-02 0.6740666 0.89076140 NA 0.05518766
lex_reversed 0.180074336 7.311330e-01 5.093054e-01 0.6140990 0.05492031 0.05518766 NA
cat(paste("","\n",""))# Correlations for Hearing
print("HEARING Correlations - Pearson's r")[1] "HEARING Correlations - Pearson's r"
#corstarsl(lexgist_hearing)
Hmisc::rcorr(as.matrix(lexgist_hearing))$r aoasl signyrs age gist_forward gist_reversed lex_forward lex_reversed
aoasl 1.00000000 -0.07887013 0.3468184 -0.15525565 0.07815751 0.02500269 0.01411303
signyrs -0.07887013 1.00000000 0.9021947 0.57814670 0.28845748 0.36725658 0.20828810
age 0.34681845 0.90219468 1.0000000 0.44651473 0.30963454 0.30931753 0.20139593
gist_forward -0.15525565 0.57814670 0.4465147 1.00000000 0.29502174 0.57154566 0.07645807
gist_reversed 0.07815751 0.28845748 0.3096345 0.29502174 1.00000000 0.35682374 0.57951176
lex_forward 0.02500269 0.36725658 0.3093175 0.57154566 0.35682374 1.00000000 0.36558339
lex_reversed 0.01411303 0.20828810 0.2013959 0.07645807 0.57951176 0.36558339 1.00000000
print("HEARING Correlations - P-values")[1] "HEARING Correlations - P-values"
Hmisc::rcorr(as.matrix(lexgist_hearing))$P aoasl signyrs age gist_forward gist_reversed lex_forward lex_reversed
aoasl NA 7.205586e-01 1.049514e-01 0.479339909 0.722986497 0.909841021 0.949040176
signyrs 0.7205586 NA 4.046899e-09 0.003857505 0.181932462 0.084723426 0.340222805
age 0.1049514 4.046899e-09 NA 0.032691671 0.150502508 0.150942632 0.356794880
gist_forward 0.4793399 3.857505e-03 3.269167e-02 NA 0.171744860 0.004385475 0.728786878
gist_reversed 0.7229865 1.819325e-01 1.505025e-01 0.171744860 NA 0.094647552 0.003755275
lex_forward 0.9098410 8.472343e-02 1.509426e-01 0.004385475 0.094647552 NA 0.086260140
lex_reversed 0.9490402 3.402228e-01 3.567949e-01 0.728786878 0.003755275 0.086260140 NA
cat(paste("","\n",""))# Correlations for All
print("ALL Correlations - Pearson's r")[1] "ALL Correlations - Pearson's r"
#corstarsl(lexgist_all)
Hmisc::rcorr(as.matrix(lexgist_all))$r aoasl signyrs age gist_forward gist_reversed lex_forward lex_reversed
aoasl 1.00000000 -0.7852245 -0.3136458 -0.3230903 -0.3922803 -0.08115845 -0.3394521
signyrs -0.78522450 1.0000000 0.8314757 0.4956183 0.3356193 0.29698992 0.3182316
age -0.31364575 0.8314757 1.0000000 0.4602616 0.1930257 0.36318284 0.1886432
gist_forward -0.32309031 0.4956183 0.4602616 1.0000000 0.2712761 0.49279109 0.1521110
gist_reversed -0.39228034 0.3356193 0.1930257 0.2712761 1.0000000 0.21701819 0.4921550
lex_forward -0.08115845 0.2969899 0.3631828 0.4927911 0.2170182 1.00000000 0.3800772
lex_reversed -0.33945209 0.3182316 0.1886432 0.1521110 0.4921550 0.38007715 1.0000000
print("ALL Correlations - P-values")[1] "ALL Correlations - P-values"
Hmisc::rcorr(as.matrix(lexgist_all))$P aoasl signyrs age gist_forward gist_reversed lex_forward
aoasl NA 5.523138e-12 2.356068e-02 0.0194786567 0.0040239673 0.5673489939
signyrs 5.523138e-12 NA 2.309264e-14 0.0001870211 0.0150006737 0.0325116001
age 2.356068e-02 2.309264e-14 NA 0.0005965582 0.1703671221 0.0081373882
gist_forward 1.947866e-02 1.870211e-04 5.965582e-04 NA 0.0517394597 0.0002061625
gist_reversed 4.023967e-03 1.500067e-02 1.703671e-01 0.0517394597 NA 0.1222542968
lex_forward 5.673490e-01 3.251160e-02 8.137388e-03 0.0002061625 0.1222542968 NA
lex_reversed 1.382018e-02 2.149676e-02 1.804672e-01 0.2817023354 0.0002107074 0.0054478274
lex_reversed
aoasl 0.0138201778
signyrs 0.0214967644
age 0.1804672184
gist_forward 0.2817023354
gist_reversed 0.0002107074
lex_forward 0.0054478274
lex_reversed NA
I’m also including nicely formatted tables with *** indicators of significance for quick referencing. Order: Deaf, Hearing, All.
corstarsl(lexgist_deaf)corstarsl(lexgist_hearing)corstarsl(lexgist_all)Let’s visualize what’s happening with the correlations here.
ggpairs(lexgist_data, columns = c(2:8), aes(color = hearing))
plot: [1,1] [==------------------------------------------------------------------------] 2% est: 0s
plot: [1,2] [===-----------------------------------------------------------------------] 4% est: 5s
plot: [1,3] [=====---------------------------------------------------------------------] 6% est: 5s
plot: [1,4] [======--------------------------------------------------------------------] 8% est: 5s
plot: [1,5] [========------------------------------------------------------------------] 10% est: 5s
plot: [1,6] [=========-----------------------------------------------------------------] 12% est: 5s
plot: [1,7] [===========---------------------------------------------------------------] 14% est: 4s
plot: [2,1] [============--------------------------------------------------------------] 16% est: 4s
plot: [2,2] [==============------------------------------------------------------------] 18% est: 4s
plot: [2,3] [===============-----------------------------------------------------------] 20% est: 4s
plot: [2,4] [=================---------------------------------------------------------] 22% est: 4s
plot: [2,5] [==================--------------------------------------------------------] 24% est: 4s
plot: [2,6] [====================------------------------------------------------------] 27% est: 4s
plot: [2,7] [=====================-----------------------------------------------------] 29% est: 4s
plot: [3,1] [=======================---------------------------------------------------] 31% est: 4s
plot: [3,2] [========================--------------------------------------------------] 33% est: 3s
plot: [3,3] [==========================------------------------------------------------] 35% est: 3s
plot: [3,4] [===========================-----------------------------------------------] 37% est: 3s
plot: [3,5] [=============================---------------------------------------------] 39% est: 3s
plot: [3,6] [==============================--------------------------------------------] 41% est: 3s
plot: [3,7] [================================------------------------------------------] 43% est: 3s
plot: [4,1] [=================================-----------------------------------------] 45% est: 3s
plot: [4,2] [===================================---------------------------------------] 47% est: 3s
plot: [4,3] [====================================--------------------------------------] 49% est: 3s
plot: [4,4] [======================================------------------------------------] 51% est: 3s
plot: [4,5] [=======================================-----------------------------------] 53% est: 2s
plot: [4,6] [=========================================---------------------------------] 55% est: 2s
plot: [4,7] [==========================================--------------------------------] 57% est: 2s
plot: [5,1] [============================================------------------------------] 59% est: 2s
plot: [5,2] [=============================================-----------------------------] 61% est: 2s
plot: [5,3] [===============================================---------------------------] 63% est: 2s
plot: [5,4] [================================================--------------------------] 65% est: 2s
plot: [5,5] [==================================================------------------------] 67% est: 2s
plot: [5,6] [===================================================-----------------------] 69% est: 2s
plot: [5,7] [=====================================================---------------------] 71% est: 2s
plot: [6,1] [======================================================--------------------] 73% est: 1s
plot: [6,2] [========================================================------------------] 76% est: 1s
plot: [6,3] [=========================================================-----------------] 78% est: 1s
plot: [6,4] [===========================================================---------------] 80% est: 1s
plot: [6,5] [============================================================--------------] 82% est: 1s
plot: [6,6] [==============================================================------------] 84% est: 1s
plot: [6,7] [===============================================================-----------] 86% est: 1s
plot: [7,1] [=================================================================---------] 88% est: 1s
plot: [7,2] [==================================================================--------] 90% est: 1s
plot: [7,3] [====================================================================------] 92% est: 0s
plot: [7,4] [=====================================================================-----] 94% est: 0s
plot: [7,5] [=======================================================================---] 96% est: 0s
plot: [7,6] [========================================================================--] 98% est: 0s
plot: [7,7] [==========================================================================]100% est: 0s
Now eye gaze data. Boxplots first. Also here, we’re renaming “chin” to “neck” because that’s what it actually is! But we also have to fix all NA’s in the percentages to zeros, becuase that’s what they actually are.
# rename chin to neck
fulldata <- fulldata %>%
rename(neck = chin) %>%
gather(aoi, percent, belly:upperchest)
# Fix all NA's in Percent column to 0
fixpercent <- fulldata$percent
fulldata$percent <- coalesce(fixpercent, 0)
fulldata <- fulldata %>%
spread(aoi, percent)
fulldata %>%
filter(eye_exclude == FALSE) %>%
select(direction, belly:upperchest) %>%
gather(aoi, percent, belly:upperchest) %>%
ggplot(aes(x = aoi, y = percent, fill = direction)) + geom_boxplot()But let’s try error charts too! Instead of boxplots.
fulldata_error <- fulldata %>%
filter(eye_exclude == FALSE) %>%
gather(aoi, percent, belly:upperchest) %>%
group_by(id, direction, aoi) %>%
summarise(percent = mean(percent, na.rm = TRUE)) %>%
ungroup() %>%
distinct() %>%
group_by(direction, aoi) %>%
summarise(mean = mean(percent, na.rm = TRUE),
sd = sd(percent, na.rm = TRUE),
count = n(),
se = sd/sqrt(count))
fulldata_error$aoi <- fct_relevel(fulldata_error$aoi, c("forehead","eyes","mouth","neck","upperchest",
"midchest","lowerchest","belly","left","right"))
fulldata_error %>%
ggplot(aes(x = aoi, y = mean, fill = direction)) +
geom_bar(stat = "identity", position = position_dodge()) +
geom_errorbar(aes(ymin = mean-se, ymax = mean+se), position = position_dodge(0.9), width = 0.5) +
labs(title = "Eye Gaze Behavior", x = "", y = "looking time") +
scale_y_continuous(labels = percent, limits = c(0,.70)) +
theme_bw() +
theme(axis.text.x = element_text(angle = 30, hjust = 1, vjust = 1))And a table of eye gaze results too
fulldata_gazetable <- fulldata %>%
filter(eye_exclude == FALSE) %>%
gather(aoi, percent, belly:upperchest) %>%
group_by(id, maingroup, direction, aoi) %>%
summarise(percent = mean(percent, na.rm = TRUE)) %>%
ungroup() %>%
distinct() %>%
group_by(maingroup, direction, aoi) %>%
summarise(mean = mean(percent, na.rm = TRUE),
sd = sd(percent, na.rm = TRUE)) %>%
mutate(mean = round(mean*100,1),
sd = round(sd*100,1)) %>%
mutate(value = paste(mean, sd, sep = " ± ")) %>%
mutate(value = paste(value, "%", sep = ""))
fulldata_gazetable$aoi <- fct_relevel(fulldata_gazetable$aoi, c("forehead","eyes","mouth","neck","upperchest",
"midchest","lowerchest","belly","left","right"))
fulldata_gazetable %>%
ungroup() %>%
select(-mean, -sd) %>%
spread(aoi, value)fulldata_total <- fulldata %>%
filter(eye_exclude == FALSE) %>%
gather(aoi, percent, belly:upperchest) %>%
group_by(aoi) %>%
summarise(percent = mean(percent, na.rm = TRUE)) %>%
spread(aoi, percent)
#sum(fulldata_total$eyes, fulldata_total$mouth, fulldata_total$neck)
#fulldata_total$left
#fulldata_total$rightNow we’re going to try a three-way Group x Direction x AOI ANOVA with the top 3 AOIs (Eyes, Mouth, Neck)
$ANOVA
Effect DFn DFd F p p<.05 ges
2 maingroup 3 47 3.0877532 3.602912e-02 * 0.0019613548
3 direction 1 47 14.6917045 3.751848e-04 * 0.0008045246
5 aoi 2 94 38.9261560 4.838451e-13 * 0.4115853001
4 maingroup:direction 3 47 0.8509636 4.731139e-01 0.0001398905
6 maingroup:aoi 6 94 1.1224334 3.553342e-01 0.0570561521
7 direction:aoi 2 94 7.0028846 1.462185e-03 * 0.0208462714
8 maingroup:direction:aoi 6 94 0.6318533 7.044042e-01 0.0057298396
$ANOVA
Effect DFn DFd F p p<.05 ges
2 maingroup 3 47 2.5418616 0.06755936 0.09343220
3 aoi 1 47 1.8880127 0.17594392 0.01444195
4 maingroup:aoi 3 47 0.8434728 0.47700559 0.01926124
So we have significant maingroup:aoi and direction:aoi interactions. Let’s try to visualize what can be driving these. We can go back to the SEM chart but break it down…
First are the maingroup:aoi charts The error bars are not 100% accurate, I took a quick-n-easy way around
aoi3_interactions_maingroupaoi <- fulldata %>%
filter(eye_exclude == FALSE) %>%
select(id, participant, maingroup, direction, eyes, mouth, neck) %>%
gather(aoi, percent, c(eyes, mouth, neck)) %>%
group_by(id, maingroup, direction, aoi) %>%
mutate(percent = mean(percent, na.rm = TRUE)) %>%
distinct() %>%
group_by(maingroup, aoi) %>%
summarise(mean = mean(percent, na.rm = TRUE),
sd = sd(percent, na.rm = TRUE),
count = n()/2,
se = sd/sqrt(count))
# I need to first collapse across stories for each participant...here I didn't. Must fix later.
aoi3_interactions_maingroupaoi %>%
ggplot(aes(x = aoi, y = mean, fill = maingroup)) +
geom_bar(stat = "identity", position = position_dodge()) +
geom_errorbar(aes(ymin = mean-se, ymax = mean+se), position = position_dodge(0.9), width = 0.5) +
labs(title = "MainGroup & AOI Interaction 1", subtitle = "Error bars represent SE", x = "", y = "percent looking") +
scale_y_continuous(labels = percent)aoi3_interactions_maingroupaoi %>%
ggplot(aes(x = maingroup, y = mean, fill = aoi)) +
geom_bar(stat = "identity", position = position_dodge()) +
geom_errorbar(aes(ymin = mean-se, ymax = mean+se), position = position_dodge(0.9), width = 0.5) +
labs(title = "MainGroup & AOI Interaction 2", subtitle = "Error bars represent SE", x = "", y = "percent looking") +
scale_y_continuous(labels = percent)First are the direction:aoi charts The error bars are not 100% accurate, I took a quick-n-easy way around
aoi3_interactions_directionaoi <- fulldata %>%
filter(eye_exclude == FALSE) %>%
select(id, participant, maingroup, direction, eyes, mouth, neck) %>%
gather(aoi, percent, c(eyes, mouth, neck)) %>%
group_by(id, maingroup, direction, aoi) %>%
mutate(percent = mean(percent, na.rm = TRUE)) %>%
distinct() %>%
group_by(direction, aoi) %>%
summarise(mean = mean(percent, na.rm = TRUE),
sd = sd(percent, na.rm = TRUE),
count = n(),
se = sd/sqrt(count))
# I need to first collapse across stories for each participant...here I didn't. Must fix later.
aoi3_interactions_directionaoi %>%
ggplot(aes(x = aoi, y = mean, fill = direction)) +
geom_bar(stat = "identity", position = position_dodge()) +
geom_errorbar(aes(ymin = mean-se, ymax = mean+se), position = position_dodge(0.9), width = 0.5) +
labs(title = "MainGroup & Direction Interaction 1", subtitle = "Error bars represent SE", x = "", y = "percent looking") +
scale_y_continuous(labels = percent)aoi3_interactions_directionaoi %>%
ggplot(aes(x = direction, y = mean, fill = aoi)) +
geom_bar(stat = "identity", position = position_dodge()) +
geom_errorbar(aes(ymin = mean-se, ymax = mean+se), position = position_dodge(0.9), width = 0.5) +
labs(title = "MainGroup & Direction Interaction 2", subtitle = "Error bars represent SE", x = "", y = "percent looking") +
scale_y_continuous(labels = percent)Let’s get tables of our means here, in various configurations
Converting "id" to factor for ANOVA.Converting "direction" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "direction" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "direction" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
We originally defined FaceChest such that
BUT. Chin is actually neck. It’s not even part of the face if you think about it. So I’m redefining FaceChest as:
So let’s do this. Then see what’s happening across groups for FaceChest.
Cool. Next we’ll do error bar charts using the new FaceChest across groups.
facechest_info <- fulldata %>%
filter(eye_exclude == FALSE) %>%
group_by(maingroup, direction, participant) %>%
summarise(facechest = mean(facechest, na.rm = TRUE)) %>%
group_by(maingroup, direction) %>%
summarise(mean = mean(facechest),
sd = sd(facechest),
n = n(),
se = sd/sqrt(n)) %>%
ungroup() %>%
mutate(maingroup = case_when(
maingroup == "DeafEarly" ~ "Deaf Early",
maingroup == "DeafLate" ~ "Deaf Late",
maingroup == "HearingLate" ~ "Hearing Late",
maingroup == "HearingNovice" ~ "Hearing Novice"
))
ggplot(facechest_info, aes(x = maingroup, y = mean, fill = direction, color = direction)) +
geom_point(stat = "identity", position = position_dodge(0.5), size = 2) +
geom_errorbar(aes(ymin = mean-se, ymax = mean+se), position = position_dodge(0.5), width = 0.3, size = 1) +
labs(title = "Face-Chest Ratio", x = "", y = "face-chest ratio") +
scale_y_continuous(limits = c(-1,1)) +
geom_hline(yintercept = 0, linetype = "dotted") +
theme_bw()Now let’s do the ANOVAs. Also skipping LSDs here.
Grouping rowwise data frame strips rowwise natureConverting "id" to factor for ANOVA.Converting "direction" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Converting "id" to factor for ANOVA.Converting "maingroup" to factor for ANOVA.Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
$ANOVA
NA
Next we’re going to correlate our eye gaze metrics (Eye, Mouth, Neck, and FaceChest) with lexical recall and gist. Okay! But remember we have a slightly smaller dataset here because we’ve excluded some participants for having bad eye data (but they had valid behavioral data so we kept them in the AoA-Performance correlations above).
We also removed gist_forward column.
eyeperf <- fulldata %>%
filter(eye_exclude == FALSE) %>%
select(participant, maingroup, hearing, direction, aoasl, signyrs, acc, gist, eyes, mouth, neck, facechest) %>%
group_by(maingroup, participant, direction) %>%
mutate(gist = mean(gist, na.rm = TRUE),
lex = mean(acc, na.rm = TRUE),
eyes = mean(eyes, na.rm = TRUE),
mouth = mean(mouth, na.rm = TRUE),
neck = mean(neck, na.rm = TRUE),
facechest = mean(facechest, na.rm = TRUE)) %>%
ungroup() %>%
select(maingroup, participant, hearing, direction, aoasl, signyrs, gist, lex, eyes, mouth, neck, facechest) %>%
distinct() %>%
gather(metric, value, gist:facechest) %>%
unite(metricvalue, c(metric, direction), sep = "_") %>%
spread(metricvalue, value) %>%
select(-participant, -maingroup) %>%
select(hearing, aoasl, signyrs, gist_reversed, lex_forward, lex_reversed, eyes_forward, eyes_reversed,
mouth_forward, mouth_reversed, neck_forward, neck_reversed, facechest_forward, facechest_reversed)Grouping rowwise data frame strips rowwise nature
eyeperf_deaf <- eyeperf %>% filter(hearing == "Deaf") %>% select(-hearing)
eyeperf_hearing <- eyeperf %>% filter(hearing == "Hearing") %>% select(-hearing)
eyeperf_all <- eyeperf %>% select(-hearing)
# Correlations for Deaf
print("DEAF Correlations - Pearson's r")[1] "DEAF Correlations - Pearson's r"
#corstarsl(lexgist_deaf)
Hmisc::rcorr(as.matrix(eyeperf_deaf))$r aoasl signyrs gist_reversed lex_forward lex_reversed eyes_forward
aoasl 1.00000000 -0.501882732 -0.22660857 0.1172403 -0.16780065 0.06486298
signyrs -0.50188273 1.000000000 -0.10665206 0.3851766 -0.02521074 0.08415831
gist_reversed -0.22660857 -0.106652059 1.00000000 -0.1103272 0.30316901 -0.06319147
lex_forward 0.11724032 0.385176599 -0.11032724 1.0000000 0.12103733 0.19560269
lex_reversed -0.16780065 -0.025210742 0.30316901 0.1210373 1.00000000 -0.09834590
eyes_forward 0.06486298 0.084158309 -0.06319147 0.1956027 -0.09834590 1.00000000
eyes_reversed 0.02247978 0.095836595 0.02254098 0.1946094 -0.07989090 0.53012073
mouth_forward 0.17733160 0.093835786 0.13998124 0.1127365 0.13984634 -0.40389580
mouth_reversed 0.30344567 0.007193097 0.06590948 0.1511229 0.11828493 -0.18798503
neck_forward -0.23936971 -0.133463204 -0.10845388 -0.2818219 -0.06254636 -0.40213531
neck_reversed -0.32970390 -0.052028485 -0.07553297 -0.2951812 -0.01236971 -0.29756692
facechest_forward 0.25001433 0.150099218 0.10233361 0.2796232 0.05057043 0.37868726
facechest_reversed 0.30789807 0.086108170 0.08644924 0.3039166 0.03749677 0.28118142
eyes_reversed mouth_forward mouth_reversed neck_forward neck_reversed
aoasl 0.02247978 0.17733160 0.303445667 -0.23936971 -0.32970390
signyrs 0.09583659 0.09383579 0.007193097 -0.13346320 -0.05202848
gist_reversed 0.02254098 0.13998124 0.065909483 -0.10845388 -0.07553297
lex_forward 0.19460939 0.11273646 0.151122898 -0.28182188 -0.29518121
lex_reversed -0.07989090 0.13984634 0.118284926 -0.06254636 -0.01236971
eyes_forward 0.53012073 -0.40389580 -0.187985033 -0.40213531 -0.29756692
eyes_reversed 1.00000000 -0.10849377 -0.451476872 -0.32258892 -0.42235607
mouth_forward -0.10849377 1.00000000 0.648739517 -0.66524893 -0.54832852
mouth_reversed -0.45147687 0.64873952 1.000000000 -0.52286172 -0.59771758
neck_forward -0.32258892 -0.66524893 -0.522861719 1.00000000 0.82565296
neck_reversed -0.42235607 -0.54832852 -0.597717583 0.82565296 1.00000000
facechest_forward 0.32650983 0.69180554 0.496383160 -0.99141806 -0.79461950
facechest_reversed 0.43328831 0.58112735 0.598425627 -0.83648926 -0.99196124
facechest_forward facechest_reversed
aoasl 0.25001433 0.30789807
signyrs 0.15009922 0.08610817
gist_reversed 0.10233361 0.08644924
lex_forward 0.27962315 0.30391663
lex_reversed 0.05057043 0.03749677
eyes_forward 0.37868726 0.28118142
eyes_reversed 0.32650983 0.43328831
mouth_forward 0.69180554 0.58112735
mouth_reversed 0.49638316 0.59842563
neck_forward -0.99141806 -0.83648926
neck_reversed -0.79461950 -0.99196124
facechest_forward 1.00000000 0.81218421
facechest_reversed 0.81218421 1.00000000
print("DEAF Correlations - P-values")[1] "DEAF Correlations - P-values"
Hmisc::rcorr(as.matrix(eyeperf_deaf))$P aoasl signyrs gist_reversed lex_forward lex_reversed eyes_forward
aoasl NA 0.005536857 0.2462148 0.54472632 0.3933760 0.738164157
signyrs 0.005536857 NA 0.5890836 0.03907663 0.8986709 0.664257588
gist_reversed 0.246214823 0.589083649 NA 0.57623604 0.1168234 0.749383585
lex_forward 0.544726321 0.039076627 0.5762360 NA 0.5395250 0.309208485
lex_reversed 0.393375956 0.898670879 0.1168234 0.53952504 NA 0.618567671
eyes_forward 0.738164157 0.664257588 0.7493836 0.30920849 0.6185677 NA
eyes_reversed 0.909600391 0.627592567 0.9093553 0.32102372 0.6861273 0.003712324
mouth_forward 0.357428170 0.628269399 0.4774249 0.56039098 0.4778537 0.029787577
mouth_reversed 0.116473224 0.971021367 0.7389667 0.44270508 0.5488533 0.338088512
neck_forward 0.211072759 0.490065680 0.5827693 0.13857704 0.7518624 0.030576543
neck_reversed 0.086644292 0.792600787 0.7024562 0.12727155 0.9501866 0.124081940
facechest_forward 0.190862018 0.437057268 0.6043367 0.14181424 0.7982931 0.042791159
facechest_reversed 0.110944251 0.663069865 0.6618134 0.11587894 0.8497523 0.147206817
eyes_reversed mouth_forward mouth_reversed neck_forward neck_reversed
aoasl 0.909600391 3.574282e-01 0.1164732242 2.110728e-01 8.664429e-02
signyrs 0.627592567 6.282694e-01 0.9710213673 4.900657e-01 7.926008e-01
gist_reversed 0.909355255 4.774249e-01 0.7389666674 5.827693e-01 7.024562e-01
lex_forward 0.321023718 5.603910e-01 0.4427050811 1.385770e-01 1.272716e-01
lex_reversed 0.686127314 4.778537e-01 0.5488532932 7.518624e-01 9.501866e-01
eyes_forward 0.003712324 2.978758e-02 0.3380885118 3.057654e-02 1.240819e-01
eyes_reversed NA 5.826299e-01 0.0158823163 9.408046e-02 2.515937e-02
mouth_forward 0.582629892 NA 0.0001883815 8.235941e-05 2.519354e-03
mouth_reversed 0.015882316 1.883815e-04 NA 4.307483e-03 7.826592e-04
neck_forward 0.094080464 8.235941e-05 0.0043074830 NA 6.358068e-08
neck_reversed 0.025159368 2.519354e-03 0.0007826592 6.358068e-08 NA
facechest_forward 0.089925263 3.228725e-05 0.0072161132 0.000000e+00 4.429714e-07
facechest_reversed 0.021262891 1.183228e-03 0.0007685904 2.946681e-08 0.000000e+00
facechest_forward facechest_reversed
aoasl 1.908620e-01 1.109443e-01
signyrs 4.370573e-01 6.630699e-01
gist_reversed 6.043367e-01 6.618134e-01
lex_forward 1.418142e-01 1.158789e-01
lex_reversed 7.982931e-01 8.497523e-01
eyes_forward 4.279116e-02 1.472068e-01
eyes_reversed 8.992526e-02 2.126289e-02
mouth_forward 3.228725e-05 1.183228e-03
mouth_reversed 7.216113e-03 7.685904e-04
neck_forward 0.000000e+00 2.946681e-08
neck_reversed 4.429714e-07 0.000000e+00
facechest_forward NA 1.541998e-07
facechest_reversed 1.541998e-07 NA
cat(paste("","\n",""))# Correlations for Hearing
print("HEARING Correlations - Pearson's r")[1] "HEARING Correlations - Pearson's r"
#corstarsl(lexgist_hearing)
Hmisc::rcorr(as.matrix(eyeperf_hearing))$r aoasl signyrs gist_reversed lex_forward lex_reversed eyes_forward
aoasl 1.00000000 -0.07887013 0.078157514 0.08908092 0.06994864 -0.3113572
signyrs -0.07887013 1.00000000 0.288457483 0.26130641 0.22209269 0.1324982
gist_reversed 0.07815751 0.28845748 1.000000000 0.32119471 0.61989301 -0.2017262
lex_forward 0.08908092 0.26130641 0.321194708 1.00000000 0.23279549 -0.2064124
lex_reversed 0.06994864 0.22209269 0.619893014 0.23279549 1.00000000 -0.0936432
eyes_forward -0.31135717 0.13249823 -0.201726153 -0.20641239 -0.09364320 1.0000000
eyes_reversed -0.23457415 0.30698404 -0.003896097 -0.04361310 -0.12855424 0.7946519
mouth_forward 0.17806749 0.06609090 -0.022039175 0.04471777 -0.12913127 -0.7573641
mouth_reversed 0.06256448 0.04730904 -0.057827983 -0.08355581 0.01769962 -0.4947033
neck_forward 0.38414940 -0.24596132 0.367403537 0.36551589 0.36037686 -0.5478414
neck_reversed 0.29446188 -0.38249552 0.223993644 0.27462074 0.24863580 -0.5678435
facechest_forward -0.28903425 0.30186427 -0.340341955 -0.28030962 -0.29633671 0.5328411
facechest_reversed -0.20474470 0.43157929 -0.163039193 -0.15098999 -0.19097045 0.5098403
eyes_reversed mouth_forward mouth_reversed neck_forward neck_reversed
aoasl -0.234574154 0.17806749 0.06256448 0.3841494 0.29446188
signyrs 0.306984037 0.06609090 0.04730904 -0.2459613 -0.38249552
gist_reversed -0.003896097 -0.02203918 -0.05782798 0.3674035 0.22399364
lex_forward -0.043613102 0.04471777 -0.08355581 0.3655159 0.27462074
lex_reversed -0.128554240 -0.12913127 0.01769962 0.3603769 0.24863580
eyes_forward 0.794651926 -0.75736409 -0.49470326 -0.5478414 -0.56784350
eyes_reversed 1.000000000 -0.53289974 -0.60845947 -0.5244592 -0.66767001
mouth_forward -0.532899737 1.00000000 0.73505580 -0.0809406 0.06470188
mouth_reversed -0.608459473 0.73505580 1.00000000 -0.0758556 -0.09060995
neck_forward -0.524459183 -0.08094060 -0.07585560 1.0000000 0.76188785
neck_reversed -0.667670012 0.06470188 -0.09060995 0.7618878 1.00000000
facechest_forward 0.513289094 0.14471392 0.19576141 -0.9424162 -0.78331023
facechest_reversed 0.602644563 0.05395970 0.23728788 -0.7260022 -0.93513525
facechest_forward facechest_reversed
aoasl -0.2890342 -0.2047447
signyrs 0.3018643 0.4315793
gist_reversed -0.3403420 -0.1630392
lex_forward -0.2803096 -0.1509900
lex_reversed -0.2963367 -0.1909705
eyes_forward 0.5328411 0.5098403
eyes_reversed 0.5132891 0.6026446
mouth_forward 0.1447139 0.0539597
mouth_reversed 0.1957614 0.2372879
neck_forward -0.9424162 -0.7260022
neck_reversed -0.7833102 -0.9351352
facechest_forward 1.0000000 0.8350726
facechest_reversed 0.8350726 1.0000000
print("HEARING Correlations - P-values")[1] "HEARING Correlations - P-values"
Hmisc::rcorr(as.matrix(eyeperf_hearing))$P aoasl signyrs gist_reversed lex_forward lex_reversed eyes_forward
aoasl NA 0.72055862 0.722986497 0.68606718 0.751135086 1.481267e-01
signyrs 0.72055862 NA 0.181932462 0.22845065 0.308433949 5.467283e-01
gist_reversed 0.72298650 0.18193246 NA 0.13506603 0.001604978 3.559903e-01
lex_forward 0.68606718 0.22845065 0.135066028 NA 0.285087190 3.446869e-01
lex_reversed 0.75113509 0.30843395 0.001604978 0.28508719 NA 6.708451e-01
eyes_forward 0.14812668 0.54672830 0.355990294 0.34468693 0.670845077 NA
eyes_reversed 0.28131767 0.15421037 0.985923639 0.84336552 0.558831962 5.929025e-06
mouth_forward 0.41628381 0.76447263 0.920492311 0.83944758 0.557053614 2.859607e-05
mouth_reversed 0.77672173 0.83027171 0.793254811 0.70466052 0.936112687 1.640479e-02
neck_forward 0.07033578 0.25793084 0.084589444 0.08632257 0.091175442 6.807338e-03
neck_reversed 0.17259799 0.07165620 0.304204139 0.20474801 0.252624987 4.707219e-03
facechest_forward 0.18102107 0.16155367 0.112046749 0.19514544 0.169752614 8.849713e-03
facechest_reversed 0.34868489 0.03975328 0.457300336 0.49164189 0.382738792 1.294574e-02
eyes_reversed mouth_forward mouth_reversed neck_forward neck_reversed
aoasl 2.813177e-01 4.162838e-01 7.767217e-01 7.033578e-02 1.725980e-01
signyrs 1.542104e-01 7.644726e-01 8.302717e-01 2.579308e-01 7.165620e-02
gist_reversed 9.859236e-01 9.204923e-01 7.932548e-01 8.458944e-02 3.042041e-01
lex_forward 8.433655e-01 8.394476e-01 7.046605e-01 8.632257e-02 2.047480e-01
lex_reversed 5.588320e-01 5.570536e-01 9.361127e-01 9.117544e-02 2.526250e-01
eyes_forward 5.929025e-06 2.859607e-05 1.640479e-02 6.807338e-03 4.707219e-03
eyes_reversed NA 8.840848e-03 2.065194e-03 1.019589e-02 4.996113e-04
mouth_forward 8.840848e-03 NA 6.461917e-05 7.135195e-01 7.692911e-01
mouth_reversed 2.065194e-03 6.461917e-05 NA 7.308466e-01 6.809521e-01
neck_forward 1.019589e-02 7.135195e-01 7.308466e-01 NA 2.398635e-05
neck_reversed 4.996113e-04 7.692911e-01 6.809521e-01 2.398635e-05 NA
facechest_forward 1.224782e-02 5.100229e-01 3.706863e-01 1.861311e-11 9.878377e-06
facechest_reversed 2.339301e-03 8.068219e-01 2.756272e-01 8.797435e-05 6.290368e-11
facechest_forward facechest_reversed
aoasl 1.810211e-01 3.486849e-01
signyrs 1.615537e-01 3.975328e-02
gist_reversed 1.120467e-01 4.573003e-01
lex_forward 1.951454e-01 4.916419e-01
lex_reversed 1.697526e-01 3.827388e-01
eyes_forward 8.849713e-03 1.294574e-02
eyes_reversed 1.224782e-02 2.339301e-03
mouth_forward 5.100229e-01 8.068219e-01
mouth_reversed 3.706863e-01 2.756272e-01
neck_forward 1.861311e-11 8.797435e-05
neck_reversed 9.878377e-06 6.290368e-11
facechest_forward NA 7.177950e-07
facechest_reversed 7.177950e-07 NA
cat(paste("","\n",""))# Correlations for All
print("ALL Correlations - Pearson's r")[1] "ALL Correlations - Pearson's r"
#corstarsl(lexgist_all)
Hmisc::rcorr(as.matrix(eyeperf_all))$r aoasl signyrs gist_reversed lex_forward lex_reversed eyes_forward
aoasl 1.00000000 -0.78522450 -0.3232638240 -0.142631680 -0.25779733 0.1023350
signyrs -0.78522450 1.00000000 0.2341087610 0.363347173 0.24984565 -0.0971436
gist_reversed -0.32326382 0.23410876 1.0000000000 0.157367334 0.44831455 -0.1583381
lex_forward -0.14263168 0.36334717 0.1573673338 1.000000000 0.23866823 -0.1346806
lex_reversed -0.25779733 0.24984565 0.4483145475 0.238668233 1.00000000 -0.1345993
eyes_forward 0.10233497 -0.09714360 -0.1583380550 -0.134680599 -0.13459931 1.0000000
eyes_reversed 0.08366051 -0.02729736 -0.0331474617 -0.007873518 -0.14027905 0.7066929
mouth_forward -0.06004520 0.21724346 0.1270669401 0.116687804 0.05451585 -0.6230710
mouth_reversed -0.08601686 0.25058311 0.1034677997 0.081888258 0.14056188 -0.3857141
neck_forward -0.12643635 -0.03886278 0.0342302844 0.051669102 0.10643122 -0.4273281
neck_reversed -0.09436191 -0.11454841 -0.0002581948 0.003536053 0.07954131 -0.3926680
facechest_forward 0.06745102 0.12098147 -0.0335624404 -0.031654894 -0.09553912 0.4281833
facechest_reversed -0.00671559 0.23324074 0.0425947122 0.063717648 -0.02840233 0.3631589
eyes_reversed mouth_forward mouth_reversed neck_forward neck_reversed
aoasl 0.083660506 -0.06004520 -0.08601686 -0.12643635 -0.0943619087
signyrs -0.027297357 0.21724346 0.25058311 -0.03886278 -0.1145484149
gist_reversed -0.033147462 0.12706694 0.10346780 0.03423028 -0.0002581948
lex_forward -0.007873518 0.11668780 0.08188826 0.05166910 0.0035360528
lex_reversed -0.140279055 0.05451585 0.14056188 0.10643122 0.0795413107
eyes_forward 0.706692934 -0.62307096 -0.38571414 -0.42732805 -0.3926679790
eyes_reversed 1.000000000 -0.36512721 -0.54427344 -0.38895777 -0.5032187104
mouth_forward -0.365127206 1.00000000 0.70370090 -0.40481210 -0.2855360210
mouth_reversed -0.544273436 0.70370090 1.00000000 -0.31946859 -0.3897527158
neck_forward -0.388957769 -0.40481210 -0.31946859 1.00000000 0.7993095517
neck_reversed -0.503218710 -0.28553602 -0.38975272 0.79930955 1.0000000000
facechest_forward 0.402936906 0.43687293 0.35403353 -0.96537608 -0.7889307141
facechest_reversed 0.482238919 0.34413567 0.45460728 -0.76219910 -0.9576927423
facechest_forward facechest_reversed
aoasl 0.06745102 -0.00671559
signyrs 0.12098147 0.23324074
gist_reversed -0.03356244 0.04259471
lex_forward -0.03165489 0.06371765
lex_reversed -0.09553912 -0.02840233
eyes_forward 0.42818332 0.36315894
eyes_reversed 0.40293691 0.48223892
mouth_forward 0.43687293 0.34413567
mouth_reversed 0.35403353 0.45460728
neck_forward -0.96537608 -0.76219910
neck_reversed -0.78893071 -0.95769274
facechest_forward 1.00000000 0.81137252
facechest_reversed 0.81137252 1.00000000
print("ALL Correlations - P-values")[1] "ALL Correlations - P-values"
Hmisc::rcorr(as.matrix(eyeperf_all))$P aoasl signyrs gist_reversed lex_forward lex_reversed eyes_forward
aoasl NA 5.523138e-12 0.0206764715 0.313119467 0.0677889791 4.703512e-01
signyrs 5.523138e-12 NA 0.0982310781 0.008106492 0.0770305388 4.932766e-01
gist_reversed 2.067647e-02 9.823108e-02 NA 0.270089935 0.0009694904 2.671087e-01
lex_forward 3.131195e-01 8.106492e-03 0.2700899346 NA 0.0916709472 3.411308e-01
lex_reversed 6.778898e-02 7.703054e-02 0.0009694904 0.091670947 NA 3.463483e-01
eyes_forward 4.703512e-01 4.932766e-01 0.2671087463 0.341130821 0.3463483357 NA
eyes_reversed 5.594433e-01 8.491958e-01 0.8173807987 0.956269902 0.3261870511 6.830266e-09
mouth_forward 6.724059e-01 1.218575e-01 0.3742437833 0.410046028 0.7039809873 8.097570e-07
mouth_reversed 5.483940e-01 7.613369e-02 0.4699673532 0.567822001 0.3252028385 5.184763e-03
neck_forward 3.717642e-01 7.844425e-01 0.8115222617 0.716024525 0.4572739900 1.579676e-03
neck_reversed 5.101240e-01 4.234798e-01 0.9985652716 0.980352890 0.5790064531 4.369926e-03
facechest_forward 6.347056e-01 3.929129e-01 0.8151343981 0.823711779 0.5048365664 1.542092e-03
facechest_reversed 9.626962e-01 9.952016e-02 0.7666339865 0.656893631 0.8431666495 8.811831e-03
eyes_reversed mouth_forward mouth_reversed neck_forward neck_reversed
aoasl 5.594433e-01 6.724059e-01 5.483940e-01 3.717642e-01 5.101240e-01
signyrs 8.491958e-01 1.218575e-01 7.613369e-02 7.844425e-01 4.234798e-01
gist_reversed 8.173808e-01 3.742438e-01 4.699674e-01 8.115223e-01 9.985653e-01
lex_forward 9.562699e-01 4.100460e-01 5.678220e-01 7.160245e-01 9.803529e-01
lex_reversed 3.261871e-01 7.039810e-01 3.252028e-01 4.572740e-01 5.790065e-01
eyes_forward 6.830266e-09 8.097570e-07 5.184763e-03 1.579676e-03 4.369926e-03
eyes_reversed NA 8.425391e-03 3.651371e-05 4.789468e-03 1.673548e-04
mouth_forward 8.425391e-03 NA 8.423032e-09 2.913237e-03 4.224662e-02
mouth_reversed 3.651371e-05 8.423032e-09 NA 2.230426e-02 4.696719e-03
neck_forward 4.789468e-03 2.913237e-03 2.230426e-02 NA 2.037925e-12
neck_reversed 1.673548e-04 4.224662e-02 4.696719e-03 2.037925e-12 NA
facechest_forward 3.372262e-03 1.203117e-03 1.081053e-02 0.000000e+00 6.159073e-12
facechest_reversed 3.391156e-04 1.340835e-02 8.043284e-04 8.169354e-11 0.000000e+00
facechest_forward facechest_reversed
aoasl 6.347056e-01 9.626962e-01
signyrs 3.929129e-01 9.952016e-02
gist_reversed 8.151344e-01 7.666340e-01
lex_forward 8.237118e-01 6.568936e-01
lex_reversed 5.048366e-01 8.431666e-01
eyes_forward 1.542092e-03 8.811831e-03
eyes_reversed 3.372262e-03 3.391156e-04
mouth_forward 1.203117e-03 1.340835e-02
mouth_reversed 1.081053e-02 8.043284e-04
neck_forward 0.000000e+00 8.169354e-11
neck_reversed 6.159073e-12 0.000000e+00
facechest_forward NA 5.182521e-13
facechest_reversed 5.182521e-13 NA
I’m also including nicely formatted tables with *** indicators of significance for quick referencing. Order: Deaf, Hearing, All.
corstarsl(eyeperf_deaf)corstarsl(eyeperf_hearing)corstarsl(eyeperf_all)And the correlation table.
ggpairs(eyeperf, columns = c(2:13), aes(color = hearing))
plot: [1,1] [=-------------------------------------------------------------------------] 1% est: 0s
plot: [1,2] [=-------------------------------------------------------------------------] 1% est:12s
plot: [1,3] [==------------------------------------------------------------------------] 2% est:13s
plot: [1,4] [==------------------------------------------------------------------------] 3% est:12s
plot: [1,5] [===-----------------------------------------------------------------------] 3% est:12s
plot: [1,6] [===-----------------------------------------------------------------------] 4% est:12s
plot: [1,7] [====----------------------------------------------------------------------] 5% est:12s
plot: [1,8] [====----------------------------------------------------------------------] 6% est:12s
plot: [1,9] [=====---------------------------------------------------------------------] 6% est:12s
plot: [1,10] [=====--------------------------------------------------------------------] 7% est:12s
plot: [1,11] [======-------------------------------------------------------------------] 8% est:12s
plot: [1,12] [======-------------------------------------------------------------------] 8% est:12s
plot: [2,1] [=======-------------------------------------------------------------------] 9% est:12s
plot: [2,2] [=======-------------------------------------------------------------------] 10% est:12s
plot: [2,3] [========------------------------------------------------------------------] 10% est:13s
plot: [2,4] [========------------------------------------------------------------------] 11% est:13s
plot: [2,5] [=========-----------------------------------------------------------------] 12% est:13s
plot: [2,6] [=========-----------------------------------------------------------------] 12% est:13s
plot: [2,7] [==========----------------------------------------------------------------] 13% est:13s
plot: [2,8] [==========----------------------------------------------------------------] 14% est:13s
plot: [2,9] [===========---------------------------------------------------------------] 15% est:13s
plot: [2,10] [===========--------------------------------------------------------------] 15% est:13s
plot: [2,11] [============-------------------------------------------------------------] 16% est:13s
plot: [2,12] [============-------------------------------------------------------------] 17% est:13s
plot: [3,1] [=============-------------------------------------------------------------] 17% est:13s
plot: [3,2] [=============-------------------------------------------------------------] 18% est:13s
plot: [3,3] [==============------------------------------------------------------------] 19% est:13s
plot: [3,4] [==============------------------------------------------------------------] 19% est:13s
plot: [3,5] [===============-----------------------------------------------------------] 20% est:13s
plot: [3,6] [===============-----------------------------------------------------------] 21% est:13s
plot: [3,7] [================----------------------------------------------------------] 22% est:13s
plot: [3,8] [================----------------------------------------------------------] 22% est:12s
plot: [3,9] [=================---------------------------------------------------------] 23% est:12s
plot: [3,10] [=================--------------------------------------------------------] 24% est:12s
plot: [3,11] [==================-------------------------------------------------------] 24% est:12s
plot: [3,12] [==================-------------------------------------------------------] 25% est:12s
plot: [4,1] [===================-------------------------------------------------------] 26% est:12s
plot: [4,2] [====================------------------------------------------------------] 26% est:12s
plot: [4,3] [====================------------------------------------------------------] 27% est:12s
plot: [4,4] [=====================-----------------------------------------------------] 28% est:12s
plot: [4,5] [=====================-----------------------------------------------------] 28% est:12s
plot: [4,6] [======================----------------------------------------------------] 29% est:12s
plot: [4,7] [======================----------------------------------------------------] 30% est:12s
plot: [4,8] [=======================---------------------------------------------------] 31% est:12s
plot: [4,9] [=======================---------------------------------------------------] 31% est:12s
plot: [4,10] [=======================--------------------------------------------------] 32% est:12s
plot: [4,11] [========================-------------------------------------------------] 33% est:11s
plot: [4,12] [========================-------------------------------------------------] 33% est:11s
plot: [5,1] [=========================-------------------------------------------------] 34% est:11s
plot: [5,2] [==========================------------------------------------------------] 35% est:11s
plot: [5,3] [==========================------------------------------------------------] 35% est:11s
plot: [5,4] [===========================-----------------------------------------------] 36% est:11s
plot: [5,5] [===========================-----------------------------------------------] 37% est:11s
plot: [5,6] [============================----------------------------------------------] 38% est:10s
plot: [5,7] [============================----------------------------------------------] 38% est:10s
plot: [5,8] [=============================---------------------------------------------] 39% est:10s
plot: [5,9] [=============================---------------------------------------------] 40% est:10s
plot: [5,10] [=============================--------------------------------------------] 40% est:10s
plot: [5,11] [==============================-------------------------------------------] 41% est:10s
plot: [5,12] [==============================-------------------------------------------] 42% est:10s
plot: [6,1] [===============================-------------------------------------------] 42% est:10s
plot: [6,2] [================================------------------------------------------] 43% est: 9s
plot: [6,3] [================================------------------------------------------] 44% est: 9s
plot: [6,4] [=================================-----------------------------------------] 44% est: 9s
plot: [6,5] [=================================-----------------------------------------] 45% est: 9s
plot: [6,6] [==================================----------------------------------------] 46% est: 9s
plot: [6,7] [==================================----------------------------------------] 47% est: 9s
plot: [6,8] [===================================---------------------------------------] 47% est: 9s
plot: [6,9] [===================================---------------------------------------] 48% est: 9s
plot: [6,10] [===================================--------------------------------------] 49% est: 9s
plot: [6,11] [====================================-------------------------------------] 49% est: 8s
plot: [6,12] [====================================-------------------------------------] 50% est: 8s
plot: [7,1] [======================================------------------------------------] 51% est: 8s
plot: [7,2] [======================================------------------------------------] 51% est: 8s
plot: [7,3] [=======================================-----------------------------------] 52% est: 8s
plot: [7,4] [=======================================-----------------------------------] 53% est: 8s
plot: [7,5] [========================================----------------------------------] 53% est: 8s
plot: [7,6] [========================================----------------------------------] 54% est: 8s
plot: [7,7] [=========================================---------------------------------] 55% est: 8s
plot: [7,8] [=========================================---------------------------------] 56% est: 7s
plot: [7,9] [==========================================--------------------------------] 56% est: 7s
plot: [7,10] [==========================================-------------------------------] 57% est: 7s
plot: [7,11] [==========================================-------------------------------] 58% est: 7s
plot: [7,12] [===========================================------------------------------] 58% est: 7s
plot: [8,1] [============================================------------------------------] 59% est: 7s
plot: [8,2] [============================================------------------------------] 60% est: 7s
plot: [8,3] [=============================================-----------------------------] 60% est: 7s
plot: [8,4] [=============================================-----------------------------] 61% est: 7s
plot: [8,5] [==============================================----------------------------] 62% est: 6s
plot: [8,6] [==============================================----------------------------] 62% est: 6s
plot: [8,7] [===============================================---------------------------] 63% est: 6s
plot: [8,8] [===============================================---------------------------] 64% est: 6s
plot: [8,9] [================================================--------------------------] 65% est: 6s
plot: [8,10] [================================================-------------------------] 65% est: 6s
plot: [8,11] [================================================-------------------------] 66% est: 6s
plot: [8,12] [=================================================------------------------] 67% est: 6s
plot: [9,1] [==================================================------------------------] 67% est: 6s
plot: [9,2] [==================================================------------------------] 68% est: 5s
plot: [9,3] [===================================================-----------------------] 69% est: 5s
plot: [9,4] [===================================================-----------------------] 69% est: 5s
plot: [9,5] [====================================================----------------------] 70% est: 5s
plot: [9,6] [====================================================----------------------] 71% est: 5s
plot: [9,7] [=====================================================---------------------] 72% est: 5s
plot: [9,8] [=====================================================---------------------] 72% est: 5s
plot: [9,9] [======================================================--------------------] 73% est: 5s
plot: [9,10] [======================================================-------------------] 74% est: 5s
plot: [9,11] [======================================================-------------------] 74% est: 4s
plot: [9,12] [=======================================================------------------] 75% est: 4s
plot: [10,1] [=======================================================------------------] 76% est: 4s
plot: [10,2] [========================================================-----------------] 76% est: 4s
plot: [10,3] [========================================================-----------------] 77% est: 4s
plot: [10,4] [=========================================================----------------] 78% est: 4s
plot: [10,5] [=========================================================----------------] 78% est: 4s
plot: [10,6] [==========================================================---------------] 79% est: 4s
plot: [10,7] [==========================================================---------------] 80% est: 3s
plot: [10,8] [===========================================================--------------] 81% est: 3s
plot: [10,9] [===========================================================--------------] 81% est: 3s
plot: [10,10] [===========================================================-------------] 82% est: 3s
plot: [10,11] [============================================================------------] 83% est: 3s
plot: [10,12] [============================================================------------] 83% est: 3s
plot: [11,1] [=============================================================------------] 84% est: 3s
plot: [11,2] [==============================================================-----------] 85% est: 3s
plot: [11,3] [==============================================================-----------] 85% est: 3s
plot: [11,4] [===============================================================----------] 86% est: 2s
plot: [11,5] [===============================================================----------] 87% est: 2s
plot: [11,6] [================================================================---------] 88% est: 2s
plot: [11,7] [================================================================---------] 88% est: 2s
plot: [11,8] [=================================================================--------] 89% est: 2s
plot: [11,9] [=================================================================--------] 90% est: 2s
plot: [11,10] [=================================================================-------] 90% est: 2s
plot: [11,11] [==================================================================------] 91% est: 2s
plot: [11,12] [==================================================================------] 92% est: 1s
plot: [12,1] [===================================================================------] 92% est: 1s
plot: [12,2] [====================================================================-----] 93% est: 1s
plot: [12,3] [====================================================================-----] 94% est: 1s
plot: [12,4] [=====================================================================----] 94% est: 1s
plot: [12,5] [=====================================================================----] 95% est: 1s
plot: [12,6] [======================================================================---] 96% est: 1s
plot: [12,7] [======================================================================---] 97% est: 1s
plot: [12,8] [=======================================================================--] 97% est: 0s
plot: [12,9] [=======================================================================--] 98% est: 0s
plot: [12,10] [=======================================================================-] 99% est: 0s
plot: [12,11] [========================================================================] 99% est: 0s
plot: [12,12] [========================================================================]100% est: 0s
And finally, we’re going to do heat maps.
eyegaze_heat <- fulldata %>%
ungroup() %>%
filter(eye_exclude == FALSE) %>%
select(id:direction, belly, lowerchest, midchest, upperchest, neck, mouth, eyes, forehead) %>%
gather(aoi, percent, belly:forehead) %>%
group_by(maingroup, participant, direction, aoi) %>%
summarise(percent = mean(percent, na.rm=TRUE)) %>%
group_by(maingroup,direction,aoi) %>%
summarise(percent = mean(percent, na.rm=TRUE)) %>%
ungroup() %>%
filter(!is.na(aoi)) %>%
mutate(aoi = factor(aoi,levels=c("belly","lowerchest","midchest",
"upperchest","neck","mouth","eyes","forehead"))) %>%
ungroup() %>%
mutate(maingroup = case_when(
maingroup == "DeafEarly" ~ "Deaf Early",
maingroup == "DeafLate" ~ "Deaf Late",
maingroup == "HearingLate" ~ "Hearing Late",
maingroup == "HearingNovice" ~ "Hearing Novice"
))
eyegaze_heat_all <- fulldata %>%
ungroup() %>%
filter(eye_exclude == FALSE) %>%
select(id:direction, belly, lowerchest, midchest, upperchest, neck, mouth, eyes, forehead) %>%
gather(aoi, percent, belly:forehead) %>%
group_by(maingroup,participant,direction,aoi) %>%
dplyr::summarize(percent = mean(percent, na.rm=TRUE)) %>%
group_by(maingroup,direction,aoi) %>%
dplyr::summarize(percent = mean(percent, na.rm=TRUE)) %>%
group_by(maingroup,aoi) %>%
dplyr::summarize(percent = mean(percent, na.rm=TRUE)) %>%
ungroup() %>%
filter(!is.na(aoi)) %>%
mutate(aoi = factor(aoi,levels=c("belly","lowerchest","midchest",
"upperchest","neck","mouth","eyes","forehead"))) %>%
ungroup() %>%
mutate(maingroup = case_when(
maingroup == "DeafEarly" ~ "Deaf Early",
maingroup == "DeafLate" ~ "Deaf Late",
maingroup == "HearingLate" ~ "Hearing Late",
maingroup == "HearingNovice" ~ "Hearing Novice"
))
ggplot(eyegaze_heat, aes(x = maingroup, y = aoi)) +
geom_tile(aes(fill=percent),color="lightgray",na.rm=TRUE) +
scale_fill_viridis(option = "viridis", direction=-1, limits = c(0,.71), labels = percent, name = "looking time") +
theme_bw() +
theme(axis.text.x=element_text(angle=30,hjust=1),
strip.text.x = element_text(size = 11, color = "black", face = "italic"),
strip.background = element_rect(colour = "white", fill = "white"),
panel.grid.major = element_line(color = "white")) +
facet_grid(. ~ direction) +
ylab("") + xlab("") + ggtitle("Eye Gaze Heat Map, by Direction") +
scale_y_discrete(expand=c(0,0)) +
scale_x_discrete(expand = c(0,0))ggplot(eyegaze_heat_all, aes(x = maingroup, y = aoi)) +
geom_tile(aes(fill=percent),color="lightgray",na.rm=TRUE) +
scale_fill_viridis(option = "viridis", direction=-1, limits = c(0,.71), labels = percent, name = "looking time") +
theme_bw() +
theme(axis.text.x=element_text(angle=30,hjust=1),
panel.grid.major = element_line(color = "white")) +
ylab("") + xlab("") + ggtitle("Eye Gaze Heat Map (Direction Collapsed)") +
scale_y_discrete(expand=c(0,0)) +
scale_x_discrete(expand = c(0,0))Below are the p-values from the ANOVAs with 4 MainGroups. I never included Age as a covariate because it never improved the model. I included all ANOVAs for Gist and Lex Recall, and ANOVAs for any eye AOI or ratio was included only if either maingroup or direction was significant. Deafearly-Deaflate shows the LSD p-value for that comparison.
results1 <- structure(list(model = c("gist-maingroup-both", "gist-maingroup-fw",
"gist-maingroup-rv", "lexrecall-maingroup-both", "lexrecall-maingroup-fw",
"lexrecall-maingroup-rv", "mouth-maingroup-both", "upperchest-maingroup-both",
"upperchest-maingroup-rv", "facechest-maingroup-both", "moutheye-maingroup-both"
), maingroup = c(0, 0, 0.01, 0, 0.04, 0.02, 0.06, 0, 0.01, 0.1,
0.05), direction = c(0, NA, NA, 0, NA, NA, 0.06, 0.16, NA, 0.07,
0.48), `deafearly-deaflate` = c(0.1, 0.69, 0.02, 0.11, 0.95,
0.06, 0.38, 0.94, 0.52, 0.08, 0.68)), .Names = c("model", "maingroup",
"direction", "deafearly-deaflate"), class = c("tbl_df", "tbl",
"data.frame"), row.names = c(NA, -11L))
results1And below are the p-values from the ANCOVAs with Hearing & AoASL. I included all ANCOVAs for Gist and Lex Recall, and ANCOVAs for any eye AOI or ratio was included only if any main factor was significant. LSD comparisons are not needed because there’s only 2 levels in each group!
results2 <- structure(list(model = c("gist-both", "gist-fw", "gist-rv", "lex-both",
"lex-fw", "lex-rv", "forehead-fw", "mouth-both", "mouth-rv",
"upperchest-both", "upperchest-rv", "facechest-both", "moutheye-both"
), hearing = c(0, 0.00, 0.01, 0.01, 0.22, 0.03, 0.06, 0.01,
0.04, 0.01, 0.01, 0.35, 0.07), direction = c(0, NA, NA, 0, NA,
NA, NA, 0.05, NA, 0.21, NA, 0.05, 0.52), aoasl = c(0.22, 0.77,
0.19, 0.56, 0.58, 0.25, 0.08, 0.06, 0.12, 0.68, 0.95, 0.12, 0.44
), age = c(0.08, 0.01, 0.86, 0.09, 0.02, 0.7, 0.68, 0.28, 0.5,
0.02, 0.08, 0.00, 0.21)), .Names = c("model", "hearing", "direction",
"aoasl", "age"), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-13L))
results2Finally, the correlations for Deaf and Hearing separately are not significant. But there are significant correlations across all participants. I worry it is caused by HearingNovice, though…
results3 <- tribble(
~ metric, ~ AoASLcorrelationRvalue, ~ Pvalue,
"gist-fw", -0.32, 0.019,
"gist-rv", -0.39, 0.004,
"lex-fw", -0.08, 0.567,
"lex-rv", -0.34, 0.014
)
results3Let’s make triangle plots. “What?” you say. Read on.
library(ggtern)
fulldata %>%
ggtern(aes(x = eyes, y = mouth, z = neck)) + facet_grid(direction ~ maingroup) + stat_density_tern(geom='polygon', aes(fill=..level..), bins=4) + geom_point(color = "white", alpha = 0.5) + theme_bw()fulldata %>%
ggtern(aes(x = eyes, y = mouth, z = neck)) + facet_grid(direction ~ maingroup) + geom_confidence_tern(breaks = c(.5), color = "red") + geom_point() + theme_bw()About Adults:
-I think I want to write it up as an ANCOVA, with direction included. And LSD comparisons instead of Tukey. (I will do my own corrections) -You often have one liners summarizing results, in all tabs, those are nice, keep them coming. -(If you have reasons to present anything other than the ANCOVA, put that in your results tab)
I think if we do it this way then we get a really important story to tell: That the critical AoA cutoff is below 4 vs above 4 years of age (two groups 0-4 vs 4-13). This suggest early ASL is important.